<template>
  <div id="">
    <!--  删除提示框  -->
    <div class="dialog">
      <el-dialog :close-on-click-modal="false" :visible.sync="showDialog" :title="title" @close="close">
        <slot name="header">

        </slot >
        <slot name="content">

        </slot>
        <slot name="Footer" slot="footer">

        </slot>
<!--        <div class="dialog-footer" slot="footer">-->
<!--&lt;!&ndash;          <el-button @click="deleteProject" class="dialogBtn" type="primary">确定</el-button>&ndash;&gt;-->
<!--&lt;!&ndash;          <el-button @click="isDelete = false" class="dialogBtn" type="primary">取 消</el-button>&ndash;&gt;-->
<!--        </div>-->
<!--        <div class="deleteText">确定要删除所选项目吗？</div>-->
<!--        <div class="dialog-footer" slot="footer" v-if="isShowFooter">-->
<!--          <el-button  class="dialogBtn" type="primary">确定</el-button>-->
<!--          <el-button  class="dialogBtn" type="primary" @click="cancel">取 消</el-button>-->
<!--        </div>-->
      </el-dialog>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Dialog',
  props: {
    isShowFooter: {
      type: Boolean,
      default: true
    },
    isShowDialog: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ''
    }
  },
  created () {

  },
  data () {
    return {
      showDialog: false
    }
  },
  methods: {
    close () {
      this.$emit('close', this.showDialog)
    },
    cancel () {
      this.showDialog = false
      this.$emit('cancel', this.showDialog)
    }
  },
  watch: {
    isShowDialog (newVal, oldVal) {
      this.showDialog = newVal
    },
    // title (newVal, oldVal) {
    //
    // }
  }
}
</script>

<style lang="less" scoped>
</style>
